package com.raising.framework.datasource;

/**
 * 数据源操作
 * @author gaoy
 */
public class DataSourceHolder {
    /**线程本地环境*/
    private static final ThreadLocal<String> DATASOURCES = new ThreadLocal<>();
    /**设置数据源*/
    public static void setDataSource(String customerType) {
        DATASOURCES.set(customerType);
    }
    /**获取数据源*/
    public static String getDataSource() {
        return DATASOURCES.get();
    }
    /**清除数据源*/
    public static void clearDataSource() {
        DATASOURCES.remove();
    }

}